﻿// dl_tarot.cpp: 定义应用程序的入口点。
//

#include "head.h"
#include "ui_main.h"
#include "kit.h"

KitManager* g_kit;

void Init()
{
	g_factory->LoadFont("font/SweiShearSansCJKsc-Bold.ttf");
	g_factory->LoadFont("font/SweiShearSansCJKsc-Bold.ttf");
	g_ui->SetStandardSize({ 800, 600 });
	
	g_scene->Add("main", new UIMain);

	g_kit = new KitManager;
	snd_play("bg0");
}

void Run()
{

}

int main()
{
	Engine::Init();

	g_time->SetFPS(60);
	g_system->SetFuncInit(Init);
	g_system->SetFuncRun(Run);

	g_factory->SetPath("image/", "", "binary/", "temp/");
	g_audio->Init("sound/config.json");

	ParamWindow param;
	param._strTitle = fmt::format("{} {}", TR_STR_NAME, TR_STR_VERSION);
	param._size = { 800, 600 };
	g_system->Start(param);

	delete g_kit;
	Engine::Release();
	return 0;
}
